<!DOCTYPE html>
<html data-dpr="1" style="font-size: 39px;">

<head>
    {include file="common/meta2" /}
    {include file="common/meta3" /}

    <link rel="stylesheet" type="text/css" href="/assets/css2/diqu.css">
    <script src="/assets/js2/picker.min.js"></script>
    <script src="/assets/js2/city.js"></script>

</head>

<body class="jui_bg_grey" style="font-size: 12px;">
    <!-- 头部 -->

    <!-- 头部end -->
    <!-- 主体 -->

    <div class="jui_public_tit jui_fc_000">您当前临时人脉</div>
    <div class="jui_bg_fff" id="rm_con">
        <div class="jui_public_list2">
            <div class="rm_tx"><img src="/assets/img2/tx.jpg" alt=""></div>
            <div class="jui_flex1 jui_pad_l12 jui_pad_r20">
                <p class="jui_fc_000">哈哈</p>
                <p class="jui_fc_999 ellipsis_2"></p>
            </div>
        </div>
        <div class="jui_pad_16 jui_text_center jui_fc_999 jui_fs12">- 加载完成 -</div>
    </div>
    <!-- 主体end -->
    <!-- 弹出框 -->
    <div class="jui_box_bar jui_none" id="box_bar2"></div>
    <!-- 弹出框end -->

    <div class="jui_h80"></div>

    {include file="common/foot" /}
   
    <script src="/assets/js2/cityjs_cb.js"></script>
    <div class="picker">
        <div class="picker-mask mask-hook"></div>
        <div class="picker-panel panel-hook">
            <div class="picker-choose choose-hook">
                <span class="cancel cancel-hook">取消</span>
                <span class="confirm confirm-hook">确定</span>
                <h1 class="picker-title">地址选择</h1>
            </div>
            <div class="picker-content">
                <div class="mask-top border-1px"></div>
                <div class="mask-bottom border-1px"></div>
                <div class="wheel-wrapper wheel-wrapper-hook">

                    <div class="wheel wheel-hook">
                        <ul class="wheel-scroll wheel-scroll-hook">

                            <li class="wheel-item" data-val="0">北京</li>

                            <li class="wheel-item" data-val="1">广东</li>

                            <li class="wheel-item" data-val="2">上海</li>

                            <li class="wheel-item" data-val="3">天津</li>

                            <li class="wheel-item" data-val="4">重庆</li>

                            <li class="wheel-item" data-val="5">辽宁</li>

                            <li class="wheel-item" data-val="6">江苏</li>

                            <li class="wheel-item" data-val="7">湖北</li>

                            <li class="wheel-item" data-val="8">四川</li>

                            <li class="wheel-item" data-val="9">陕西</li>

                            <li class="wheel-item" data-val="10">河北</li>

                            <li class="wheel-item" data-val="11">山西</li>

                            <li class="wheel-item" data-val="12">河南</li>

                            <li class="wheel-item" data-val="13">吉林</li>

                            <li class="wheel-item" data-val="14">黑龙江</li>

                            <li class="wheel-item" data-val="15">内蒙古</li>

                            <li class="wheel-item" data-val="16">山东</li>

                            <li class="wheel-item" data-val="17">安徽</li>

                            <li class="wheel-item" data-val="18">浙江</li>

                            <li class="wheel-item" data-val="19">福建</li>

                            <li class="wheel-item" data-val="20">湖南</li>

                            <li class="wheel-item" data-val="21">广西</li>

                            <li class="wheel-item" data-val="22">江西</li>

                            <li class="wheel-item" data-val="23">贵州</li>

                            <li class="wheel-item" data-val="24">云南</li>

                            <li class="wheel-item" data-val="25">西藏</li>

                            <li class="wheel-item" data-val="26">海南</li>

                            <li class="wheel-item" data-val="27">甘肃</li>

                            <li class="wheel-item" data-val="28">宁夏</li>

                            <li class="wheel-item" data-val="29">青海</li>

                            <li class="wheel-item" data-val="30">新疆</li>

                            <li class="wheel-item" data-val="31">香港</li>

                            <li class="wheel-item" data-val="32">澳门</li>

                            <li class="wheel-item" data-val="33">台湾</li>

                            <li class="wheel-item" data-val="34">海外</li>

                            <li class="wheel-item" data-val="35">其他</li>

                        </ul>
                    </div>

                    <div class="wheel wheel-hook">
                        <ul class="wheel-scroll wheel-scroll-hook">

                            <li class="wheel-item" data-val="0">东城区</li>

                            <li class="wheel-item" data-val="1">西城区</li>

                            <li class="wheel-item" data-val="2">崇文区</li>

                            <li class="wheel-item" data-val="3">宣武区</li>

                            <li class="wheel-item" data-val="4">朝阳区</li>

                            <li class="wheel-item" data-val="5">海淀区</li>

                            <li class="wheel-item" data-val="6">丰台区</li>

                            <li class="wheel-item" data-val="7">石景山区</li>

                            <li class="wheel-item" data-val="8">房山区</li>

                            <li class="wheel-item" data-val="9">通州区</li>

                            <li class="wheel-item" data-val="10">顺义区</li>

                            <li class="wheel-item" data-val="11">昌平区</li>

                            <li class="wheel-item" data-val="12">大兴区</li>

                            <li class="wheel-item" data-val="13">怀柔区</li>

                            <li class="wheel-item" data-val="14">平谷区</li>

                            <li class="wheel-item" data-val="15">门头沟区</li>

                            <li class="wheel-item" data-val="16">密云县</li>

                            <li class="wheel-item" data-val="17">延庆县</li>

                            <li class="wheel-item" data-val="18">其他</li>

                        </ul>
                    </div>

                </div>
            </div>
            <div class="picker-footer footer-hook"></div>
        </div>
    </div>
    <script language="javascript">
        function getScrollTop() {
            var scrollTop = 0;
            if (document.documentElement && document.documentElement.scrollTop) {
                scrollTop = document.documentElement.scrollTop;
            } else if (document.body) {
                scrollTop = document.body.scrollTop;
            }
            return scrollTop;
        }
        function getClientHeight() {
            var clientHeight = 0;
            if (document.body.clientHeight && document.documentElement.clientHeight) {
                clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight);
            } else {
                clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
            }
            return clientHeight;
        }
        function getScrollHeight() {
            return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
        }
        var region = '';
        var s_key = '';
        var m_hang = 0;
        var m_gender = 0;
        var page = 1;
        var limit = 20;
        var lock = 1;
        function load_html(result) {
            var lists = result;
            if (lists.length > 0) {
                for (i = 0, ii = lists.length; i < ii; i++) {
                    var tmp_html = '';
                    var tmp_data = lists[i];
                    if (tmp_data.avatar == false || tmp_data.avatar == '') {
                        tmp_data.avatar = '/public/image/tx.jpg';
                    }
                    tmp_html = tmp_html + '<div class="jui_public_list2">';
                    tmp_html = tmp_html + '<div class="rm_tx"><img src="' + tmp_data.avatar + '" alt=""></div>';
                    tmp_html = tmp_html + '<div class="jui_flex1 jui_pad_l12 jui_pad_r20">';
                    tmp_html = tmp_html + '<p class="jui_fc_000">' + tmp_data.nickname + '</p>';
                    tmp_html = tmp_html + '<P class="jui_fc_999 ellipsis_2">' + tmp_data.username + '</P>';
                    tmp_html = tmp_html + '</div>';
                    if (tmp_data.m_qrcode != '') {
                        tmp_html = tmp_html + '<div class="rm_ewm" id="' + tmp_data.mobile + '"><img src="/assets/img2/ewm.png"></div>';
                    }
                    tmp_html = tmp_html + '</div>';
                    $('#rm_con').append(tmp_html);
                }
                if (lists.length < limit) {
                    $('#rm_con').append('<div class="jui_pad_16 jui_text_center jui_fc_999 jui_fs12">- 加载完成 -</div>');
                } else {
                    lock = 0;//解除加载锁
                }
            } else {
                $('#rm_con').append('<div class="jui_pad_16 jui_text_center jui_fc_999 jui_fs12">- 加载完成 -</div>');
            }
        }
        function load_url() {
            var url = '/index/team/nteam_fetch?page=' + page + '&s_hang=' + m_hang + '&s_gender=' + m_gender + '&s_region=' + encodeURI(region) + '&s_key=' + encodeURI(s_key) + '&limit=' + limit;
            $.get(url, function (ret) {
                load_html(ret);
            }, 'json');
        }
        function call_city() {
            region = $('#sel_city').html();
            if (region.trim() == '请选择地区') {
                region = '';
            }
            m_hang = $('#m_hang').val();
            m_gender = $('#m_gender').val();
            s_key = $('#s_key').val();
            page = 1;
            $('#rm_con').html('');
            load_url();
        }
        $(document).ready(function () {
            $(document).on("click", ".rm_ewm", function () {
                var phone = $(this).attr('id');
                $.post('?m=team&c=infos', { 'phone': phone }, function (retmsg) {
                    if (parseInt(retmsg.code) == 1) {
                        $("#box_bar2").html(retmsg.msg);
                        $("#box_bar2").removeClass('jui_none');
                    } else {
                        layer.msg(retmsg.msg);
                    }
                }, 'json');

            });
            $(document).on("click", "#close2", function () {
                $("#box_bar2").addClass('jui_none');
            });
            $('#m_hang').change(function () {
                call_city();
            });
            $('#m_gender').change(function () {
                call_city();
            });
            $('#search').on('submit', function () {
                event.preventDefault();
                call_city();
            });

            load_url();
        });
    </script>


</body>

</html>